<div class="row block" id="changewidth">

    <div class="panel panel-primary">

        <div class="panel-heading">
            <span class="panel-controls">

                <button class="btn btn-primary" uib-tooltip="刷新" ng-click="approvaledit.reload()" ><i class="fa fa-refresh fa-fw" ng-class="{'fa-spin':!approvaledit.loadover}" ></i></button>
                <button class="btn btn-primary" ng-click="approvaledit.cancel()" uib-tooltip="关闭">
                    <i class="fa fa-times fa-fw"></i>
                </button>
            </span>
            <h5>审批:{{approvaledit.data.name}}</h5>
        </div>

        <div class="panel-body" ng-init="ns = { 'null': '未发送', 'sending': '发送中', 'done':'完成', 'skip': '忽略', 'fail': '失败'}">
            <div class="panel-tabs">
                <table ng-table="approvaledit.dataTable" class="table table-hover text-center table-condensed">
                    <tr ng-repeat="d in $data">
                        <td style="width: 10%" data-title="'审批人'">{{d.user}}</td>
                        <td style="width: 10%" data-title="'耗时'">{{approvaledit.seftime(d.create_time,d.finishtime)}}</td>
                        <td style="width: 10%" data-title="'OA单号'">{{d.oauuid}}</td>
                        <td style="width: 10%" data-title="'通知状态'" >{{ns[d.notifystatus]}}</td>
                        <td style="width: 10%" data-title="'审批状态'">
                            <a ng-if="d.opinion == 'agree'" style="color: green"> 同意 </a>
                            <a ng-if="d.opinion == 'unconfirmed'"> 未审批 </a>
                            <a ng-if="d.opinion == 'refuse'" style="color: red"> 拒绝 </a>
                       </td>
                    </tr>
                </table>
            </div>
        </div>

        <div class="table-responsive" style="width: 100%">
            <table class="table table-bordered" style="font-weight: bold;border: 0px;">
                <tbody>
                    <tr>
                        <td>创建时间</td>
                        <td>{{approvaledit.data.create_time}}</td>
                        <td>审批名称</td>
                        <td>{{approvaledit.data.name}}</td>
                        <td>提交人</td>
                        <td>{{approvaledit.data.submitter}}</td>
                    </tr>
                </tbody>
            </table>
        </div>

        <a>审批内容: {{approvaledit.data.cont}}</a>

        <div class="panel-footer text-right">
            <button class="btn btn-success" ng-disabled="!approvaledit.show" ng-click="approvaledit.edit('agree')">同意</button>
            <button class="btn btn-danger" ng-disabled="!approvaledit.show" ng-click="approvaledit.edit('refuse')">拒绝</button>
        </div>

    </div>

</div>
